import axios from '@/utils/axios'

export const getRoleAppRelationList = (
  params: BaseRoleAppRelationPO
): Promise<ApiResult<BaseRoleAppRelationPO[]>> => {
  return axios.get(`base/role/app/relation/list`, { params })
}

export const postRoleAppRelation = (params: {
  roleId: string
  appIds: string[]
}): Promise<ApiResult<null>> => {
  return axios.post(`base/role/app/relation/allocateAppByRoleId`, {}, { params })
}
